package com.tydic.portal.domain.bo;

import com.tydic.common.core.validate.AddGroup;
import com.tydic.common.core.validate.EditGroup;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

/**
 * 忘记密码请求参数
 */
@Data
public class ForgetPasswordBo implements Serializable {
    @Serial
    private static final long serialVersionUID = 7690711211889994007L;
    /**
     * 手机号
     */
    @Pattern(regexp = "1[3456789][0-9]{9}", message = "手机号不符合格式", groups = {AddGroup.class, EditGroup.class})
    @NotBlank(message = "手机号不能为空！", groups = {AddGroup.class, EditGroup.class})
    private String mobile;
    /**
     * 密码
     */
    @NotBlank(message = "密码不能为空！", groups = {AddGroup.class, EditGroup.class})
    private String password;
    /**
     * 确认密码
     */
    @NotBlank(message = "确认密码不能为空！", groups = {AddGroup.class, EditGroup.class})
    private String confirmPassword;
    /**
     * 手机验证码
     */
    @NotBlank(message = "手机验证码不能为空！", groups = {AddGroup.class, EditGroup.class})
    private String phoneCode;
    /**
     * 验证码
     */
    @NotBlank(message = "验证码不能为空！", groups = {AddGroup.class, EditGroup.class})
    private String imageCode;
}
